<?php
// $Id: page.tpl.php,v 1.18.2.1 2009/04/30 00:13:31 goba Exp $
global $user;

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <?php print $head ?>
    <title><?php print $head_title ?></title>
    <?php print $styles ?>
    <?php print $scripts ?>
    <!--[if lt IE 7]>
    <?php print phptemplate_get_ie_styles(); ?>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="<?php print base_path().path_to_theme();?>/layout.css" />
    <!--[if gt IE 7]>
    <link rel="stylesheet" type="text/css" href="<?php print base_path().path_to_theme();?>/layout_ie8.css" />
    <![endif]-->
    <script language="javascript">
      var baseurl = "<?php echo base_path();?>"
      var themeurl = "<?php echo path_to_theme();?>"
    </script>
  </head>

  <body<?php print phptemplate_body_class($left, $right); ?>>
    <?php if (arg(0) == "webfm") {?>
    	<script type="text/javascript" src="<?php echo base_path() . drupal_get_path("module", "webfm");?>/js/wz_tooltip.js"></script>
    <?php }
		elseif ( (arg(0) == "findastore" && arg(1) == "stores") ||(arg(0) == "findastore" && arg(1) == "categories")) {?>
            <!-- ODC server - ABQIAAAA-yJXr5BnJNz6-Heyu0ZqZhSxsaJ0WytQMDQ_DktgdDjBG6CyGBTBLerO6dpnzKcCIisi8wF76x3_fQ -->
			<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo variable_get('frameworkemkt_1_5_google_api','');?>" type="text/javascript"></script>
		<?php }?>

    <div class="container">
      <!--div class="headertop"></div-->
      <div class="header">
        <div class="logo"><img src="<?php print base_path().path_to_theme();?>/images/jnjlogo.jpg" border="0" alt="ITrInno" /></div>

        <?php
        if ($user->uid) {
          // Display only the attribute which is mapped in CAS settings page
          $login_value = variable_get('value_in_login_msg','user_name');
          switch($login_value){
            case 'user_name':
              $value_in_login = $user->name;
              break;
            case 'mail_id':
              $value_in_login = $user->Email;
              break;
            case 'wwid':
              $value_in_login = $user->lastName;
              break;
            default:
              $value_in_login = $user->name;
              break;
          }
        ?>

        <div class="signout"><span><a><?php echo $value_in_login;?> </a></span> <span class="redtxt">|</span> <a href="<?php echo base_path();?>user/<?php echo $user->uid;?>">My Account</a> <span class="redtxt">|</span> <a href="<?php echo base_path();?>workflow/tasklist">Task Inbox</a> <span class="redtxt">|</span> <a href="<?php echo base_path();?>logout">Logout</a> <span class="redtxt">|</span> <a href="<?php echo base_path();?>admin/help">Help</a></div>
          <?php } else {?>
        <div class="signout">&nbsp; &nbsp;</div>
          <?php }?>
        <div style="padding-top:50px;">&nbsp;</div>
        <div style="padding-left:35px;" class="rightnav">
          <?php

            if(strlen($breadcrumb)==0) {
                                if ($user->uid > 0){
                                    print "<span class='breadcrumb'>".t("Home")."</span>";
                                }else{
                                    print "<span class='breadcrumb'>".t("&nbsp;")."</span>";
                                }
				
				
			}
			else {
				//Have to find alternate way in drupal itself to over come this approach
				
	            $unwtd_str_toremove = array("%2523","%23","%25");
	            print str_replace($unwtd_str_toremove,"",$breadcrumb);
			}
			
          ?>
        </div>
      </div>
      <div class="bodycontainer">
        <div class="leftnav">
          <div class="addnurs">
            <?php if (isset($primary_links)) : ?>
              <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
            <?php endif; ?>
            <?php if (isset($secondary_links)) : ?>
              <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?>
            <?php endif; ?>
            <?php if ($left): ?>
            <div id="sidebar-left" class="listerleft">
                <?php if ($search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?>
                <?php print $left ?>
            </div>
            <?php endif; ?>
          </div>
        </div>
        <div class="rightnav">
          <div class="bodyiconout">
            
            <?php if ($mission): print '<div id="mission">'. $mission .'</div>';
            endif; ?>
            <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">';
            endif; ?>
            <!--?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?-->
            <?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>';
            endif; ?>
            <?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>';
            endif; ?>
            <?php if ($show_messages && $messages): print $messages;
            endif; ?>
            <?php print $help; ?>
          </div>
          <div class="grid">
            <?php print $content ?>
          </div>
        </div>
        <?php if ($right): ?>
        <div id="sidebar-right" class="sidebar">
            <?php if (!$left && $search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?>
            <?php print $right ?>
        </div>
        <?php endif; ?>
      </div>
      <div class="fotter">
        <div class="fottertop">© 2010 Johnson &amp; Johnson, All Rights Reserved.  </div>
        <div class="fotterbot">All materials on this site are deemed Johnson & Johnson CONFIDENTIAL Need to craft a confidentiality statement to put here. </div>
      </div>
      <br class="clear" />
    </div>
    <div id="dialog" title="Title" style="display:none;"></div>
    <div id="alertdialog" title="Title" style="display:none;"></div>
    <iframe id="hid_frame" name="hid_frame" frameborder="0" width="0" height="0"></iframe>
<?php print $closure; ?>
<?php print $scripts; ?>
  </body>
</html>
